package com.wzdigit.wms.wms.filter;
/*
 * @Author:yangwenbiao
 * @Date 2020/7/13 9:12 AM
 * @version 1.0
 */

import com.wzdigit.wms.wms.filter.wrapper.ParamHttpServletRequestWrapper;
import org.springframework.stereotype.Component;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

@Component
public class ParamFilter implements Filter {
    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {

        ParamHttpServletRequestWrapper paramHttpServletRequestWrapper = new ParamHttpServletRequestWrapper((HttpServletRequest) servletRequest);

        filterChain.doFilter(paramHttpServletRequestWrapper, servletResponse);
    }
}
